<!DOCTYPE html>
<html>
	<head>
		<title>车牌登记</title>
		<meta http-equiv="Pragma" CONTENT="no-cache">
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta name="renderer" content="webkit">
		<!-- <link href="${cxt !}/sb/themes/demo.css" rel="stylesheet" type="text/css" /> -->
		<link href="${cxt !}/ddc/css/lsdj.css" rel="stylesheet" type="text/css" />
		<%include("/common/include.html"){}%>
		<script src="http://echarts.baidu.com/build/dist/echarts.js"></script>	
		<style type="text/css">
			#customInfo li{
				display: inline-block;
				width: 165px;
				height: 30px;
				position: relative;
				margin-top: 5px;
			}
			#customInfo li div{
				position: absolute;
				right: 0px;
			}
		</style>
	</head>
	<body >
		
		<div class="easyui-layout" style="width:100%;height:100%;">
		<form id="info_form">
			
			<div data-options="region:'center'"  style="OVERFLOW-X:hidden;">
				<div class="easyui-layout" style="width:100%;">
					<%include("/commonUtil/ddcSearchCustomer.html"){}%>
					<div id="info_tabs" class="easyui-tabs" style="width:100%;">
					
							<div id="service_tab" title="信息登记" style="padding:10px;width: 100%">
								<input type="hidden" name="vehicle.LSH" value="${LSH!}">
							<%include("/ddc_vehicleChangeName/registerInformation.html"){}%>
							</div>
							<div id="dailyLife_tab" title="技术参数" style="padding:5px">	
								
								<%include("/ddc_vehicleChangeName/technical.html"){}%>	
							</div>
						
					</div>
				</div>	
				<br/>
				<br/>
				<br/>
				<br/>
				<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-ok'" style="margin-left: 45%;margin-bottom:3px;" onclick="saveInfo()">确认变更</a>
			</div>
			</form>
			</div>
			
	</body>
</html>
<script src="${cxt !}/sb/js/fineRegistration/fineRegistration.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">

$(document).ready(function () {
	

	

	$("#LSH").combobox({

	onChange: function (n,o) {

		$("#HPHM").textbox("clear");
		$("#SFZMHM").textbox("clear");
		searchCus();
	}

	});
	$("#HPHM").combobox({

		onChange: function (n,o) {

			$("#LSH").textbox("clear");
			$("#SFZMHM").textbox("clear");
			searchCus();
		}

		});
	$("#SFZMHM").combobox({

		onChange: function (n,o) {

			$("#HPHM").textbox("clear");
			$("#LSH").textbox("clear");
			searchCus();
		}

		});

	var SFZMHM=$('#SFZMHM').val();
	var LSH=$('#LSH').val();
	var HPHM=$('#HPHM').val();
	
	if(SFZMHM==''&&LSH==''&&HPHM==''){
		return false;
	}
	searchCus();
});

//获取顾客信息
function clearsj(){
	
	$("#HPHM").textbox("clear");
	$("#LSH").textbox("clear");
	$("#SFZMHM").textbox("clear");
}




//获取顾客信息
function searchCus(){

	
	var SFZMHM=$('#SFZMHM').val();
	var LSH=$('#LSH').val();
	var HPHM=$('#HPHM').val();
	
	if(SFZMHM==''&&LSH==''&&HPHM==''){
		return false;
	}
	var url='/fineRegistration/getVInfo';
	var data={"sfzmhm":SFZMHM,"lsh":LSH,"hphm":HPHM};
	var reData = common_ajax.ajaxFunc(url,data,"json");
	if(reData.msg==200){
		
		 if(reData.vehicle.zdyzt == "4"){ 
			$("#vid").val(reData.vehicle.ids);
			$("#SFZMHM").textbox('setValue',reData.vehicle.sfzmhm);
			$("#LSH").textbox('setValue',reData.vehicle.lsh);
			$("#HPHM").textbox('setValue',reData.vehicle.hphm);
			$("#ZZZ").val(reData.vehicle.zzz);
			$("#SFZMMC").val(reData.vehicle.sfzmmc);
			$("#SFZMHM_input").val(reData.vehicle.sfzmhm);
			$("#SYR").val(reData.vehicle.syr);
			$("#SYR").val(reData.vehicle.syr);
			$("#NL").val(reData.vehicle.nl);
			$("#XB").val(reData.vehicle.xb);
			$("#SFCJ").val(reData.vehicle.sfcj);
			$("#CJRZM").val(reData.vehicle.cjrzm);
			$("#SF60ZS").val(reData.vehicle.sf60zs);
			$("#LNRZM").val(reData.vehicle.lnrzm);
			$("#ZSXZQH").val(reData.vehicle.zsxzqh);
			$("#ZSXXDZ").val(reData.vehicle.zsxxdz);
			$("#SYXZ").val(reData.vehicle.syxz);
			$("#LLPZ1").val(reData.vehicle.llpz1);
			$("#PZBH1").val(reData.vehicle.pzbh1);
			$("#BZ").val(reData.vehicle.bz);
			
			
			$("#HGZBH").val(reData.vehicle.hgzbh);
			$("#CLLX").val(reData.vehicle.cllx);
			$("#CLXH").val(reData.vehicle.clxh);
			
			$("#CLPP1").val(reData.vehicle.clpp1);
			$("#zwx").val(reData.vehicle.zwx);
			$("#zyp").val(reData.vehicle.zyp);
			$("#synx").val(reData.vehicle.synx);
			$("#ZZCMC").val(reData.vehicle.zzcmc);
			$("#CSYS").val(reData.vehicle.csys);
			$("#xsgl").val(reData.vehicle.xsgl);
			
			$("#CCRQ").datebox('setValue',reData.vehicle.ccrq);
			//$("#CCRQ").val(reData.vehicle.ccrq);
			$("#GCJK").val(reData.vehicle.gcjk);
			$("#ZZG").val(reData.vehicle.zzg);
			$("#CWKC").val(reData.vehicle.cwkc);
			$("#CWKK").val(reData.vehicle.cwkk);
			$("#CWKG").val(reData.vehicle.cwkg);
			$("#GL").val(reData.vehicle.gl);
			$("#ZZL").val(reData.vehicle.zzl);
			
		 }else{
			$.alert(parent.$, "没有归档，不可变更");
		} 
		
		
	return  reData;
}
}

	

function saveInfo(){
	
	var vid=$('#vid').val();
	
	if(vid == null||vid == ""){
		 $.alert(parent.$, "请选择变更人");
	
		return false;
	}
	 $.ajax({
	    cache: true,
	    type: "POST",
	    url:"${cxt !}/vehicleChangeName/saveInfo",
	    data:$('#info_form').serialize(),// 你的formid
	    dataType:'json',
	    async: false,
	    success: function(result) {
	    	if(result==false){
	    		 $.alert(parent.$, "保存失败");
	    	}else{
	    		 $.slideMsg("保存成功", parent.$);
	    	}
			
	    	
	    	
	    }
	});
}



</script>
